package cn.luischen.controller.admin;

import org.springframework.web.bind.annotation.RequestParam;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import cn.luischen.controller.BaseController;
import org.apache.commons.lang3.StringUtils;
import io.swagger.annotations.ApiOperation;
import cn.luischen.dto.StatisticsDto;
import cn.luischen.service.user.UserService;
import javax.servlet.http.HttpSession;
import cn.luischen.service.site.SiteService;
import org.springframework.web.bind.annotation.PostMapping;
import cn.luischen.model.CommentDomain;
import com.github.pagehelper.PageInfo;
import cn.luischen.model.LogDomain;
import cn.luischen.utils.GsonUtils;
import com.unitspirit.sample.cmbchina.UserServiceImpl2;
import cn.luischen.model.ContentDomain;
import cn.luischen.constant.LogActions;
import cn.luischen.model.UserDomain;
import cn.luischen.service.log.LogService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import javax.servlet.http.HttpServletRequest;
import cn.luischen.utils.APIResponse;
import org.springframework.web.bind.annotation.GetMapping;
import io.swagger.annotations.Api;
import cn.luischen.utils.TaleUtils;
import org.slf4j.Logger;
import org.springframework.web.bind.annotation.ResponseBody;
import cn.luischen.exception.BusinessException;
import cn.luischen.constant.WebConst;

import static org.junit.Assert.fail;
import org.mockito.MockitoAnnotations;
import org.junit.After;
import java.util.Map;
import java.lang.reflect.Method;
import static org.junit.Assert.*;
import java.util.List;
import com.alibaba.fastjson.TypeReference;
import static org.junit.Assert.assertNotNull;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
import org.powermock.reflect.Whitebox;
import org.mockito.Mock;
import org.junit.runner.RunWith;
import java.util.HashMap;
import java.util.ArrayList;
import com.alibaba.fastjson.JSONArray;
import org.powermock.core.classloader.annotations.PrepareForTest;
import static org.junit.Assert.assertEquals;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.junit.rules.ExpectedException;
import org.mockito.InjectMocks;
import org.junit.Test;
import com.unitspirit.runtime.*;
import org.mockito.Mockito;
import com.alibaba.fastjson.JSON;
import org.junit.Rule;
import static org.junit.Assert.assertTrue;
import com.alibaba.fastjson.parser.ParserConfig;

/**
* The class <code>IndexControllerTest</code> contains tests for the class <code>{@link IndexController}</code>.
* Copyright (c) 2020
* 
* @generatedBy UnitSpirit at 2021-09-07 17:51:36
* @version 1.0.20210903
*/

@PowerMockIgnore({ "javax.management.*" })
public class IndexController_profile_WGTest {

	@InjectMocks
	cn.luischen.controller.admin.IndexController unitspirit_fixture;
	@Mock
	cn.luischen.service.user.UserService mock_UserService;
	@Mock
	cn.luischen.service.site.SiteService mock_SiteService;
	@Mock
	cn.luischen.service.log.LogService mock_LogService;

	@Rule
	public ExpectedException unitspirit_thrown = ExpectedException.none();

	/**
	* 测试方法初始化.
	* 
	* @throws Exception 
	*         if the initialization fails for some reason 
	*  
	* @generatedBy UnitSpirit at 2021-09-07 17:51:36
	*/
	@org.junit.Before
	public void setUp() throws Exception {
		try {
			GlobalUnitInit.init();
			MockitoAnnotations.initMocks(this);
			ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	/**
	* @date 2021-09-07 17:51:37
	* @see cn.luischen.controller.admin.IndexController#profile
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_profile_0113_190016_887_1_01() throws Throwable {
		//成员变量设置

		//返回值定义 
		String result_expected = "\"admin/profile\"";

		String unitspirit_result = unitspirit_fixture.profile();
		//getAssertCase 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
	}
}
